﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Net
{
    /// <summary>
    /// 记录读取数据时发生的错误、异常、反馈信息等
    /// </summary>
    public class getLog
    {
        public void dispose()
        {
            instance = null;
        }

        private getLog()
        {
            log = new List<string>();
        }

        static private getLog instance;

        public static getLog Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new getLog();
                }
                return instance;
            }

        }
        private List<string> log;

        public List<string> Log
        {
            get { return log; }
            set { log = value; }
        }
        private int progressValue;

        public int ProgressValue
        {
            get { return progressValue; }
            set { progressValue = value; }
        }
        public override string ToString()
        {
            string returnStr = "";
            for (int i = 0; i < log.Count; i++)
            {
                returnStr += log[i] + "\r\n";
            }
            return returnStr;
        }
    }

}
